import config from "@/config"
import http from "@/utils/request"
import qs from "qs"

export default {
	api: {
		add: {
			url: `${config.API_URL}/sys/state/add`,
			post: async function(data){
				data = qs.stringify(data)
				return await http.post(this.url,data);
			}
		},
		edit: {
			url: `${config.API_URL}/sys/state/edit`,
			post: async function(data){
				data = qs.stringify(data)
				return await http.post(this.url,data);
			}
		},
		del: {
			url: `${config.API_URL}/sys/state/del`,
			post: async function(data){
				data = qs.stringify(data, { indices: false })
				return await http.post(this.url,data);
			}
		},
		list: {
			url: `${config.API_URL}/sys/state/list`,
			get: async function(data){
				return await http.get(this.url,data);
			}
		}
	}
}
